package com.matrix.common.constant;

/**
 * @author 有点甜
 * @since 2025/7/25
 */
public class RedisConstants {
    public static final String SMS_LIMIT_KEY = "sms:limit:%s:%s";
    public static final String SMS_CODE_KEY = "sms:code:%s:%s";
    public static final String SMS_RETRY_KEY = "sms:retry:%s:%s";
    public static final String USER_REFRESH_TOKEN_KEY = "user:refresh_token:%s";
    public static final String LOCK_SHOP_MENU_KEY_PREFIX = "lock:menu:shop:%s";
    public static final String LOGIN_FAIL_COUNT_KEY = "security:login_fail_count:%s";
    public static final String LOGIN_LOCK_KEY = "security:login_lock:%s";
    public static final String IM_SESSION_KEY_PREFIX = "im:session:%s";
    public static final String IM_INBOX_KEY_PREFIX = "im:inbox:%s";
    public static final String IM_CONVERSATION_LIST_KEY_PREFIX = "im:conv_list:%s";
    public static final String IM_UNREAD_COUNT_KEY_PREFIX = "im:unread:%s";
    public static final String PRODUCT_STOCK_KEY_PREFIX = "product:stock:%s";
    public static final String USER_SEARCH_HISTORY_KEY_PREFIX = "user:search_history:%s";
    public static final String KEY_SHOP_MENU = "cache:menu:shop:%s";
    public static final String CART_KEY_PATTERN = "cart:user:%s:shop:%s";

    public static String buildKey(String format, Object... args) {
        return String.format(format, args);
    }
}
